package com.A01.utils;

import org.springframework.web.multipart.MultipartFile;


/**
 *
 */
public class UploadUtils {
    /**
     * 上传图片
     *
     * @return 图片id
     */
    public static String Upload(MultipartFile file) {
        if (file != null) {
            String fileName = System.currentTimeMillis() + "";
            String rootPath = "D:/image/";
            MultipartFileToFile.ToFile(file, rootPath + fileName);
            return fileName;
        }
        return null;
    }
}
